package sky.teleport_bow.utility;

import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

import java.util.ArrayList;
import java.util.List;

//提供和创建传送弓箭
public class BowUtility {

    public static ItemStack createBow() {
        ItemStack bow = new ItemStack(Material.BOW,1);
        ItemMeta bowMeta = bow.getItemMeta();
        bowMeta.setDisplayName(ChatColor.GREEN+ "" +ChatColor.BOLD+"传送弓");
        List<String> lore = new ArrayList<>();
        lore.add("你射出箭矢的落点");
        lore.add("就是你传送的位置");
        bowMeta.setLore(lore);
        bowMeta.addEnchant(Enchantment.ARROW_INFINITE, 1, false);
        bow.setItemMeta(bowMeta);

        return bow;
    }
}
